<style>
.feature {
	padding: 30px 0;
}
</style>
<div class="panel panel-default" ng-controller="BusConfigModuleCtrl">
	<div class="panel-heading">跨城巴士 / 模块配置</div>
	<div class="panel-body">
		<toaster-container
			toaster-options="{'position-class': 'toast-top-right', 'close-button':true}"></toaster-container>
		<div class="tab-content"
			ng-init="stats={shift:false,refundRule:true,time:false,points:false,filter:false,report:false,protocol:false,order:false,insurance:false}">
			<ul class="nav nav-tabs">
				<li ng-class="{active:stats.refundRule}"><a href role="tab"
					data-toggle="tab"
					ng-click="stats.refundRule=true;stats.time=false;stats.points=false;stats.filter=false;stats.report=false;stats.protocol=false;stats.order=false;stats.insurance=false">退票规则配置</a>
				</li>
				<li ng-class="{active:stats.time}"><a href role="tab"
					data-toggle="tab"
					ng-click="stats.refundRule=false;stats.time=true;stats.points=false;stats.filter=false;stats.report=false;stats.protocol=false;stats.order=false;stats.insurance=false">定时配置</a>
				</li>
				<li ng-class="{active:stats.points}"><a href role="tab"
					data-toggle="tab"
					ng-click="stats.refundRule=false;stats.time=false;stats.points=true;stats.filter=false;stats.report=false;stats.protocol=false;stats.order=false;stats.insurance=false">积分配置</a>
				</li>
				<li ng-class="{active:stats.filter}"><a href role="tab"
					data-toggle="tab"
					ng-click="stats.refundRule=false;stats.time=false;stats.points=false;stats.filter=true;stats.report=false;stats.protocol=false;stats.order=false;stats.insurance=false">班次筛选时段配置</a>
				</li>
				<li ng-class="{active:stats.report}"><a href role="tab"
					data-toggle="tab"
					ng-click="stats.refundRule=false;stats.time=false;stats.points=false;stats.filter=false;stats.report=true;stats.protocol=false;stats.order=false;stats.insurance=false">报班配置</a>
				</li>		
				<li ng-class="{active:stats.protocol}"><a href role="tab"
					data-toggle="tab"
					ng-click="stats.refundRule=false;stats.time=false;stats.points=false;stats.filter=false;stats.report=false;stats.protocol=true;stats.order=false;stats.insurance=false">跨城巴士服务协议</a>
				</li>		
				<li ng-class="{active:stats.insurance}"><a href role="tab"
					data-toggle="tab"
					ng-click="stats.refundRule=false;stats.time=false;stats.points=false;stats.filter=false;stats.report=false;stats.protocol=false;stats.order=false;stats.insurance=true">跨城巴士保险说明</a>
				</li>	
				<li ng-class="{active:stats.order}"><a href role="tab"
					data-toggle="tab"
					ng-click="stats.refundRule=false;stats.time=false;stats.points=false;stats.filter=false;stats.report=false;stats.protocol=false;stats.order=true;stats.insurance=false">跨城巴士订票须知</a>
				</li>															
			</ul>

			<div class="tab-pane active" id="tab-refundRule"
				ng-show="stats.refundRule">
				<div class="row feature">
					<div class="col-md-12">
						<form name="orderSaleForm" class="form-horizontal form-validation"
							role="form">
							<div class="form-group">
								<div class="col-md-offset-2 col-md-4">
									<button type="button" class="btn btn-primary"
										ng-click="save(refundRule)" ng-disabled="mailForm.$invalid"
										has-authority="BUS_MODULE_UPDATE">保存修改</button>
									<button type="button" class="btn btn-primary"
										ng-click="reset(refundRule)"
										has-authority="BUS_MODULE_UPDATE">恢复默认设置</button>
								</div>
							</div>
							<div class="form-group">
								<label class="col-sm-3 control-label">计算公式：</label>
								<div class="col-sm-4">
									<input type="text" class="form-control" placeholder="计算公式"
										ng-model="refundRule.value" required />
								</div>
							</div>
							<div class="form-group">
								<label class="col-sm-3 control-label">计算公式格式规范：</label>
								<p class="col-sm-7" style="margin-top: 5px">表达式中金额单位是元，符号必须使用半角英文。</p>
								<label class="col-sm-3 control-label"></label>
								<p class="col-sm-7" style="margin-top: 5px">departLeft>退票时限（分钟）?
									[未达到退票时限手续费百分比, 不足部分补齐金额]:[退票时限内手续费百分比,不足部分补齐金额]</p>
							</div>
						</form>
					</div>
				</div>
			</div>
			<!-- 退票规则end -->

			<div class="tab-pane active" id="tab-shift" ng-show="stats.time">
				<div class="row feature">
					<div class="col-md-12">
						<form name="refundForm" class="form-horizontal form-validation" role="form">
							<div class="form-group">
								<div class="col-md-offset-2 col-md-4">
									<button type="button" class="btn btn-primary" ng-click="save(days)" ng-disabled="mailForm.$invalid" has-authority="BUS_MODULE_UPDATE">保存修改</button>
									<button type="button" class="btn btn-primary" ng-click="reset(days)" has-authority="BUS_MODULE_UPDATE">恢复默认设置</button>
								</div>
							</div>

							<div class="form-group">
								<label class="col-md-2 control-label">
									{{days.description}}： </label>
								<div class="col-md-4">
									<input type="text" ng-model="days.value" class="form-control" ng-maxlength="3" ng-pattern="/^[0-9]*$/" required>
								</div>
								<label style="margin-top: 6px">天</label>
							</div>
							<div class="form-group">
								<label class="col-md-2 control-label"> 默认值： </label>
								<div class="col-md-4">
									<input type="text" ng-model="days.defaultValue" readonly="readonly" class="form-control">
								</div>
								<label style="margin-top: 6px">天</label>
							</div>
						</form>
					</div>
				</div>
				<!-- 订票预售日期限制end -->
				<div class="row feature">
					<div class="col-md-12">
						<form name="refundForm" class="form-horizontal form-validation" role="form">
							<div class="form-group">
								<div class="col-md-offset-2 col-md-4">
									<button type="button" class="btn btn-primary" ng-click="save(times)" ng-disabled="mailForm.$invalid" has-authority="BUS_MODULE_UPDATE">保存修改</button>
									<button type="button" class="btn btn-primary" ng-click="reset(times)" has-authority="BUS_MODULE_UPDATE">恢复默认设置</button>
								</div>
							</div>

							<div class="form-group">
								<label class="col-md-2 control-label">
									{{times.description}}： </label>
								<div class="col-md-4">
									<input type="text" ng-model="times.value" class="form-control" ng-maxlength="3" ng-pattern="/^[0-9]*$/" required>
								</div>
								<label style="margin-top: 6px">分钟</label>
							</div>
							<div class="form-group">
								<label class="col-md-2 control-label"> 默认值： </label>
								<div class="col-md-4">
									<input type="text" ng-model="times.defaultValue" readonly="readonly" class="form-control">
								</div>
								<label style="margin-top: 6px">分钟</label>
							</div>
						</form>
					</div>
				</div>
				<!-- 发车前关闭售票时间end -->
				<div class="row feature">
					<div class="col-md-12">
						<form name="refundForm" class="form-horizontal form-validation" role="form">
							<div class="form-group">
								<div class="col-md-offset-2 col-md-4">
									<button type="button" class="btn btn-primary" ng-click="save(pay)" ng-disabled="mailForm.$invalid" has-authority="BUS_MODULE_UPDATE">保存修改</button>
									<button type="button" class="btn btn-primary" ng-click="reset(pay)" has-authority="BUS_MODULE_UPDATE">恢复默认设置</button>
								</div>
							</div>

							<div class="form-group">
								<label class="col-md-2 control-label">
									{{pay.description}}： </label>
								<div class="col-md-4">
									<input type="text" ng-model="pay.value" class="form-control" ng-maxlength="3" ng-pattern="/^[0-9]*$/" required>
								</div>
								<label style="margin-top: 6px">分钟</label>
							</div>
							<div class="form-group">
								<label class="col-md-2 control-label"> 默认值： </label>
								<div class="col-md-4">
									<input type="text" ng-model="pay.defaultValue" readonly="readonly" class="form-control">
								</div>
								<label style="margin-top: 6px">分钟</label>
							</div>
						</form>
					</div>
				</div>
				<!-- 订单支付超时时间end -->
				<div class="row feature">
					<div class="col-md-12">
						<form name="refundForm" class="form-horizontal form-validation" role="form">
							<div class="form-group">
								<div class="col-md-offset-2 col-md-4">
									<button type="button" class="btn btn-primary" ng-click="save(refundTime)" ng-disabled="mailForm.$invalid" has-authority="BUS_MODULE_UPDATE">保存修改</button>
									<button type="button" class="btn btn-primary" ng-click="reset(refundTime)" has-authority="BUS_MODULE_UPDATE">恢复默认设置</button>
								</div>
							</div>

							<div class="form-group">
								<label class="col-md-2 control-label">
									{{refundTime.description}}： </label>
								<div class="col-md-4">
									<input type="text" ng-model="refundTime.value" class="form-control" ng-maxlength="3" ng-pattern="/^[0-9]*$/" required>
								</div>
								<label style="margin-top: 6px">分钟</label>
							</div>
							<div class="form-group">
								<label class="col-md-2 control-label"> 默认值： </label>
								<div class="col-md-4">
									<input type="text" ng-model="refundTime.defaultValue" readonly="readonly" class="form-control">
								</div>
								<label style="margin-top: 6px">分钟</label>
							</div>
						</form>
					</div>
				</div>
				<!-- 发车前关闭退票时间end -->				
			</div>
			<!-- 定时配置end -->


			<div class="tab-pane active" id="tab-points" ng-show="stats.points">
				<div class="row feature">
					<div class="col-md-12">
						<form name="pointForm" class="form-horizontal form-validation"
							role="form">
							<div class="form-group">
								<div class="col-md-offset-2 col-md-4">
									<button type="button" class="btn btn-primary"
										ng-click="save(points)" ng-disabled="mailForm.$invalid"
										has-authority="BUS_MODULE_UPDATE">保存修改</button>
									<button type="button" class="btn btn-primary"
										ng-click="reset(points)" has-authority="BUS_MODULE_UPDATE">恢复默认设置</button>
								</div>
							</div>
							<div class="form-group">
								<label class="col-md-2 control-label"> 当前积分比率： </label>
								<div class="col-md-4">
									<input type="text" ng-model="points.value" class="form-control"
										ng-pattern="/^\d+(\.\d+)?$/" ng-maxlength="3" required>
								</div>
								<label style="margin-top: 6px">%</label>
							</div>
							<div class="form-group">
								<label class="col-md-2 control-label"> 默认值： </label>
								<div class="col-md-4">
									<input type="text" ng-model="points.defaultValue"
										readonly="readonly" class="form-control">
								</div>
								<label style="margin-top: 6px">%</label>
							</div>
						</form>
					</div>
				</div>
			</div>
			<!-- 积分配置end -->

			<div class="tab-pane active" id="tab-teminal" ng-show="stats.filter">			
				<div class="row feature">
					<div class="col-md-12">
						<form name="fileForm" class="form-horizontal form-validation"
							role="form">
							<div class="form-group">
								<div class="col-md-offset-2 col-md-4">
									<button type="button" class="btn btn-primary"
										ng-click="fg(total)" ng-disabled="mailForm.$invalid"
										has-authority="BUS_MODULE_UPDATE">保存修改</button>
									<button type="button" class="btn btn-primary" ng-click="re()"
										has-authority="BUS_MODULE_UPDATE">恢复默认设置</button>
								</div>
							</div>
							<div class="form-group" ng-repeat="t in total">
								<label class="col-md-2 control-label"> 开始时间： </label>
								<div class="col-md-2">
									<input type="text" ng-model="t[0]" class="form-control"
										ng-pattern="/^(0\d{1}|1\d{1}|2[0-3]):[0-5]\d{1}$/" required>
								</div>
								<label class="col-md-2 control-label"> 结束时间： </label>
								<div class="col-md-2">
									<input type="text" ng-model="t[1]" class="form-control"
										ng-pattern="/^(0\d{1}|1\d{1}|2[0-3]):[0-5]\d{1}$/" required>
								</div>
							</div>
						</form>
					</div>
				</div>			
				<!-- 班次筛选时段end -->		
			</div>
			
			
		     <div class="tab-pane active" id="tab-shift" ng-show="stats.report">
				<div class="row feature">
					<div class="col-md-12">
						<form name="refundForm" class="form-horizontal form-validation" role="form">
							<div class="form-group">
								<div class="col-md-offset-2 col-md-4">
									<button type="button" class="btn btn-primary" ng-click="save(reportDay)" ng-disabled="mailForm.$invalid" has-authority="BUS_MODULE_UPDATE">保存修改</button>
									<button type="button" class="btn btn-primary" ng-click="reset(reportDay)" has-authority="BUS_MODULE_UPDATE">恢复默认设置</button>
								</div>
							</div>

							<div class="form-group">
								<label class="col-md-2 control-label">
									{{reportDay.description}}： </label>
								<div class="col-md-4">
									<input type="text" ng-model="reportDay.value" class="form-control" ng-maxlength="3" ng-pattern="/^[0-9]*$/" required>
								</div>
								<label style="margin-top: 6px">天</label>
							</div>
							<div class="form-group">
								<label class="col-md-2 control-label"> 默认值： </label>
								<div class="col-md-4">
									<input type="text" ng-model="reportDay.defaultValue" readonly="readonly" class="form-control">
								</div>
								<label style="margin-top: 6px">天</label>
							</div>
						</form>
					</div>
				</div>
				<!-- 报班天数end -->
				<div class="row feature">
					<div class="col-md-12">
						<form name="refundForm" class="form-horizontal form-validation" role="form">
							<div class="form-group">
								<div class="col-md-offset-2 col-md-4">
									<button type="button" class="btn btn-primary" ng-click="save(reportTime)" ng-disabled="mailForm.$invalid" has-authority="BUS_MODULE_UPDATE">保存修改</button>
									<button type="button" class="btn btn-primary" ng-click="reset(reportTime)" has-authority="BUS_MODULE_UPDATE">恢复默认设置</button>
								</div>
							</div>

							<div class="form-group">
								<label class="col-md-2 control-label">
									{{reportTime.description}}： </label>
								<div class="col-md-4">
									<input type="text" ng-model="reportTime.value" class="form-control" ng-maxlength="3" ng-pattern="/^[0-9]*$/" required>
								</div>
								<label style="margin-top: 6px">小时</label>
							</div>
							<div class="form-group">
								<label class="col-md-2 control-label"> 默认值： </label>
								<div class="col-md-4">
									<input type="text" ng-model="reportTime.defaultValue" readonly="readonly" class="form-control">
								</div>
								<label style="margin-top: 6px">小时</label>
							</div>		
							<div class="form-group">
								<label class="col-md-2 control-label"> 提示： </label>
								<div class="col-md-7">
									<p style="margin-top: 7px;color: red">仅对当天报班时间有效，不可超过24小时。</p>
								</div>
							</div>												
						</form>
					</div>
				</div>
				<!-- 报班时间end -->		
			</div>
			<!-- 报班配置end -->	
			
			
			<div class="tab-pane active" id="tab-protocol" ng-show="stats.protocol">
				<div class="row feature">
					<div class="col-md-12">
						<form name="orderRefundForm" class="form-horizontal form-validation" role="form">
							<div class="form-group">
								<div class="col-md-offset-2 col-md-4">
									<button type="button" class="btn btn-primary" ng-click="save(protocol)" has-authority="BUS_MODULE_UPDATE">保存修改</button>
								</div>
							</div>
							<div class="form-group">
								<label class="col-md-2 control-label"> {{protocol.description}}： </label>
								<div class="col-md-9">
									<textarea class="form-control" rows="20" ng-minlength="15" ng-maxlength="2000" ng-model="protocol.value" style="resize: none" required></textarea>
								</div>
							</div>
						</form>
					</div>
				</div>
			</div>
			<!-- 乘车协议end -->
	

			<div class="tab-pane active" id="tab-protocol" ng-show="stats.insurance">
				<div class="row feature">
					<div class="col-md-12">
						<form name="orderRefundForm" class="form-horizontal form-validation" role="form">
							<div class="form-group">
								<div class="col-md-offset-2 col-md-4">
									<button type="button" class="btn btn-primary" ng-click="save(insurance)" has-authority="BUS_MODULE_UPDATE">保存修改</button>
								</div>
							</div>
							<div class="form-group">
								<label class="col-md-2 control-label"> {{insurance.description}}： </label>
								<div class="col-md-9">
									<textarea class="form-control" rows="20" ng-minlength="15" ng-maxlength="2000" ng-model="insurance.value" style="resize: none" required></textarea>
								</div>
							</div>
						</form>
					</div>
				</div>
			</div>
			<!-- 保险说明end -->			
	
	
				<div class="tab-pane active" id="tab-protocol" ng-show="stats.order">
				<div class="row feature">
					<div class="col-md-12">
						<form name="orderRefundForm" class="form-horizontal form-validation" role="form">
							<div class="form-group">
								<div class="col-md-offset-2 col-md-4">
									<button type="button" class="btn btn-primary" ng-click="save(order)" has-authority="BUS_MODULE_UPDATE">保存修改</button>
								</div>
							</div>
							<div class="form-group">
								<label class="col-md-2 control-label"> {{order.description}}： </label>
								<div class="col-md-9">
									<textarea class="form-control" rows="20" ng-minlength="15" ng-maxlength="2000" ng-model="order.value" style="resize: none" required></textarea>
								</div>
							</div>
						</form>
					</div>
				</div>
			</div>
			<!-- 订票需知end -->	
			
		</div>
		<!-- tab-content -->
	</div>
	<!-- panel-body -->
</div>
<!-- panel -->


